﻿<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<%set string category_title=get_category_title(model.category_id,"新闻资讯")%>
<title>{model.title} - {category_title} - {site.name}</title>
<meta name="keywords" content="{model.seo_keywords}" />
<meta name="description" content="{model.seo_description}" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/style.css" />
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/weui.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>
</head>

<body ontouchstart>
<div class="page">
    <!--页面头部-->
    <div class="header">
        <a class="back" href="javascript:history.back();">
            <i class="iconfont icon-arrow-left"></i>
        </a>
        <h3>新闻资讯</h3>
        <div class="right"> 
            <a class="weui-cell_access weui-cell_link" href="javascript:;" onclick="showDialogBox('#category-box');">
                <i class="iconfont icon-nav"></i>
            </a>
        </div>
    </div>
    <!--/页面头部-->
  
    <!--页面内容-->
    <div class="page__bd">
        <!--资讯介绍-->
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__bd">
                <div class="meta">
                    <h1 class="meta-tit">{model.title}</h1>
                    <p class="meta-info">
                        <span><i class="iconfont icon-date"></i>{model.add_time}</span>
                        <span><i class="iconfont icon-msg"></i><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&channel_id={model.channel_id}&id={model.id}"></script>人评论</span>
                        <span><i class="iconfont icon-view"></i><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_article_click&channel_id={model.channel_id}&id={model.id}&click=1"></script>次浏览</span>
                    </p>
                </div>
                <div class="entry">
                    {model.content}
                </div>
            </div>
        </div>
        <!--/资讯介绍-->
        
        <!--相关资讯-->
        <div class="weui-panel weui-panel_access">
            <div class="weui-panel__hd">相关资讯</div>
            <div class="weui-panel__bd">
                <div class="txt-list">
                    <ul>
                        <%set DataTable relNews=get_article_list(channel, model.category_id, 5, "is_red=1 and id<>"+model.id)%>
                        <%foreach(DataRow dr in relNews.Rows)%>
                        <li>
                            <a href="<%linkurl("news_show",{dr[id]})%>">
                                <i class="date"><%datetostr({dr[add_time]},MM-dd)%></i>
                                <span class="text">{dr[title]}</span>
                            </a>
                        </li>
                        <%/foreach%>
                        <%if(relNews.Rows.Count<1)%>
                            <div class="nodata">暂无相关...</div>
                        <%/if%>
                    </ul>
                </div>
            </div>
        </div>
        <!--/相关资讯-->
        
        <!--网友评论-->
        <%if(model.is_msg==1)%>
        <%template src="_comment_box.html"%>
        <%/if%>
        <!--/网友评论-->
    
        <!--版权信息-->
        <%template src="_copyright.html"%>
        <!--/版权信息-->

        <!--底部导航-->
        <%template src="_footer.html"%>
        <!--/底部导航-->
    </div>
    <!--/页面内容-->
</div>

<!--类别容器-->
<div id="category-box" class="dialog-wrap">
    <div class="dialog-box">
        <div class="header">
            <a class="back" href="javascript:;" onclick="closeDialogBox('#category-box');">
                <i class="iconfont icon-arrow-left"></i>
            </a>
            <h3>栏目类别</h3>
        </div>
        <ul class="navbar">
            <%set DataTable categoryList1=get_category_child_list(channel, 0)%>
            <%foreach(DataRow cdr1 in categoryList1.Rows)%>
            <li>
                <h3><a href="<%linkurl("news_list",{cdr1[id]})%>">{cdr1[title]}</a></h3> 
                <p>
                <%set DataTable categoryList2=get_category_child_list(channel, {strtoint({cdr1[id]})})%>
                <%foreach(DataRow cdr2 in categoryList2.Rows)%>
                    <%if({strtoint({cdr2[id]})}=={model.category_id})%>
                    <a href="<%linkurl("news_list",{cdr2[id]})%>" class="selected">{cdr2[title]}</a>
                    <%else%>
                    <a href="<%linkurl("news_list",{cdr2[id]})%>">{cdr2[title]}</a>
                    <%/if%>
                <%/foreach%>
                </p>
            </li>
            <%/foreach%>
        </ul>
    </div>
</div>
<!--类别容器-->

</body>
</html>
